define([],function(){

    var proximity = {
       "description": "访问距离感应器信息",
       
       
       getCurrentProximity:function(successCB, errorCB,options){
       cordova.exec(successCB,errorCB,"Proximity","getCurrentProximity",[options]);
       },
       
       
       clearWatch:function(successCB, errorCB , watchID){
       
       clearInterval(timers[id]);
       },
       
       watchProximity:function(successCallback, errorCallback) {
       window.timers = {};
       window.id = "Proximity";
       // is an iOS request for watch by filter, no timer needed
       // Start watch timer to get headings
       timers[id] = window.setInterval(function() {
                                       proximity.getCurrentProximity(successCallback, errorCallback);
                                       }, 100);
       
       return id;

       }
       
       }
    return proximity;
       
    });